package com.xcdh.ittools.controller;

import com.api.ittools.entity.ITToolPage;
import com.api.ittools.entity.ToolDict;
import com.api.ittools.entity.ToolDictItem;
import com.xcdh.domain.vo.R;
import com.xcdh.ittools.service.ToolDatasourceService;
import com.xcdh.ittools.service.ToolDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/toolDict")
public class ToolDictController extends ITToolBaseController<ToolDict>{

    @Autowired
    private ToolDictService toolDictService ;

    @Autowired
    private ToolDatasourceService toolDatasourceService ;

    @PostMapping("/dictTreeList")
    public R dictTreeList(@RequestBody ITToolPage<ToolDictItem> toolPage){
        return R.okData(toolDictService.dictTreeList(toolPage));
    }

}
